package ge;

import ec.Solution;

import java.util.Iterator;
import java.util.List;

public class HandCodedSolution extends GESolution {

	private class ArrayIterator implements Iterator<Integer> {
		private int _idx =0;
		private int _max_idx =0;
		private int[] _ints;

		public ArrayIterator(int[] ints) {
			_ints = ints;
			_idx = 0;
			_max_idx = ints.length - 1;
		}
		
		@Override
		public boolean hasNext() {
			return (_idx < _max_idx);
		}

		@Override
		public Integer next() {
			return _ints[_idx++];
		}

		@Override
		public void remove() {
			// Do nothing
		}
		
	}

	private int[] _codons;
	
	public HandCodedSolution(int[] codons) {
		_codons = codons;
	}
	
	public Iterator<Integer> iterator() {
		return new ArrayIterator(_codons);
	}
	
	@Override
	public List<Solution> crossover(Solution solutionB) {
		return null;
	}

	@Override
	public Solution duplicate() {
		return null;
	}

	@Override
	public Solution mutate() {
		return null;
	}

}
